package com.distribute.pojo.Task;

import com.distribute.pojo.enums.TaskType;

import java.util.List;

/**
 * @author Zhen
 * @version 1.0
 * @description: TODO
 * @date 2025/7/4 14:33
 */
public class SwitchTaskDefinition extends TaskDefinition{

    private SwitchTaskParams taskParams;

    private TaskType taskType = TaskType.SWITCH;

    public TaskType getTaskType() {
        return taskType;
    }

    public void setTaskType(TaskType taskType) {
        this.taskType = taskType;
    }

    public SwitchTaskParams getTaskParams() {
        return taskParams;
    }

    public void setTaskParams(SwitchTaskParams taskParams) {
        this.taskParams = taskParams;
    }

    static class SwitchTaskParams {

        private List localParams;

        private List resourceList;

        private String rawScript;

        private SwitchParams switchResult;

        public List getLocalParams() {
            return localParams;
        }

        public void setLocalParams(List localParams) {
            this.localParams = localParams;
        }

        public List getResourceList() {
            return resourceList;
        }

        public void setResourceList(List resourceList) {
            this.resourceList = resourceList;
        }

        public String getRawScript() {
            return rawScript;
        }

        public void setRawScript(String rawScript) {
            this.rawScript = rawScript;
        }

        public SwitchParams getSwitchResult() {
            return switchResult;
        }

        public void setSwitchResult(SwitchParams switchResult) {
            this.switchResult = switchResult;
        }
    }
    static class SwitchParams {

        private List dependTaskList;

        private String nextNode;

        public List getDependTaskList() {
            return dependTaskList;
        }

        public void setDependTaskList(List dependTaskList) {
            this.dependTaskList = dependTaskList;
        }

        public String getNextNode() {
            return nextNode;
        }

        public void setNextNode(String nextNode) {
            this.nextNode = nextNode;
        }
    }
}
